package com.dayu.finecomm.mongo.pojo;

/**
 * IotPlat数据表字段
 * 
 * @author XuJialiang
 * @since 2017-09-11 14:45:12
 * @version V1.0.0
 */
public class IotPlat extends Basic<IotPlat> {
	private static final long serialVersionUID = 1L;

	/**
	 * 应用ID
	 */
	private static final String FIELD_APPID = "appid";

	/**
	 * 密码
	 */
	private static final String FIELD_SECRET = "secret";

	/**
	 * IOT 平台Host
	 */
	private static final String FIELD_SERVICE = "service";

	/**
	 * token有效时间
	 */
	private static final String FIELD_EXPIRESIN = "expiresIn";

	/**
	 * Access Token
	 */
	private static final String FIELD_ACCESS_TOKEN = "accessToken";

	/**
	 * Refresh Token
	 */
	private static final String FIELD_REFRESH_TOKEN = "refreshToken";

	/**
	 * 应用使用协议，NB大表，NB小表
	 */
	private static final String FIELD_PROTOCOL = "protocol";

	/**
	 * refreshToken刷新时间
	 */
	private static final String FIELD_REFRESH_TIME = "refreshTime";

	/**
	 * 订阅命令状态
	 */
	private static final String FIELD_SUBSCRIBE_CMDS = "subscribeCmds";

	/**
	 * 订阅批量设备数据上报
	 */
	private static final String FIELD_SUBSCRIBE_DATAS = "subscribeDatas";

	/**
	 * 获取APPID
	 * 
	 * @return
	 */
	public String getAppId() {
		return getString(FIELD_APPID);
	}

	/**
	 * 设置AppID
	 * 
	 * @param appid
	 */
	public void setAppId(String appid) {
		put(FIELD_APPID, appid);
	}

	/**
	 * 获取登录口令
	 * 
	 * @return
	 */
	public String getSecret() {
		return getString(FIELD_SECRET);
	}

	/**
	 * 设置登录口令
	 * 
	 * @param secret
	 */
	public void setSecret(String secret) {
		put(FIELD_SECRET, secret);
	}

	/**
	 * 获取IOT平台地址
	 * 
	 * @return
	 */
	public String getService() {
		return getString(FIELD_SERVICE);
	}

	/**
	 * 设置IOT平台地址
	 * 
	 * @param service
	 */
	public void setService(String service) {
		put(FIELD_SERVICE, service);
	}

	/**
	 * 获取AccessToken有效时间
	 * 
	 * @return
	 */
	public int getExpiresIn() {
		return getInt(FIELD_EXPIRESIN);
	}

	/**
	 * 设置AccessToken有效时间
	 * 
	 * @param expiresIn
	 */
	public void setExpiresIn(int expiresIn) {
		put(FIELD_EXPIRESIN, expiresIn);
	}

	/**
	 * 获取AccessToken
	 * 
	 * @return
	 */
	public String getAccessToken() {
		return getString(FIELD_ACCESS_TOKEN);
	}

	/**
	 * 设置AccessToken
	 * 
	 * @param accessToken
	 */
	public void setAccessToken(String accessToken) {
		put(FIELD_ACCESS_TOKEN, accessToken);
	}

	/**
	 * 获取RefreshToken
	 * 
	 * @return
	 */
	public String getRefreshToken() {
		return getString(FIELD_REFRESH_TOKEN);
	}

	/**
	 * 设置RefreshToken
	 * 
	 * @param refreshToken
	 */
	public void setRefreshToken(String refreshToken) {
		put(FIELD_REFRESH_TOKEN, refreshToken);
	}

	/**
	 * 
	 * @return HD86 or YL809
	 */
	public String getProtocol() {
		return getString(FIELD_PROTOCOL);
	}

	/**
	 * 
	 * @param protocol
	 *            HD86 or YL809
	 */
	public void setProtocol(String protocol) {
		put(FIELD_PROTOCOL, protocol);
	}

	/**
	 * 获取更新时间
	 * 
	 * @return
	 */
	public long getRefreshTime() {
		return getLong(FIELD_REFRESH_TIME);
	}

	/**
	 * 设置更新时间
	 * 
	 * @param time
	 */
	public void setRefreshTime(long time) {
		put(FIELD_REFRESH_TIME, time);
	}

	/**
	 * 获取命令状态订阅
	 * 
	 * @return
	 */
	public int getSubscribeCmds() {
		return getInt(FIELD_SUBSCRIBE_CMDS);
	}

	/**
	 * 设置命令状态订阅
	 * 
	 * @param subscribe
	 */
	public void setSubscribeCmds(int subscribe) {
		put(FIELD_SUBSCRIBE_CMDS, subscribe);
	}

	/**
	 * 获取批量设备数据上报订阅
	 * 
	 * @return
	 */
	public int getSubscribeDatas() {
		return getInt(FIELD_SUBSCRIBE_DATAS);
	}

	/**
	 * 设置批量设备数据上报订阅
	 * 
	 * @param subscribe
	 */
	public void setSubscribeDatas(int subscribe) {
		put(FIELD_SUBSCRIBE_DATAS, subscribe);
	}
}
